Optimal. Leaf size=147 \[ \frac {2 (35 A-14 B+18 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{105 d}+\frac {2 a (35 A+49 B+27 C) \tan (c+d x)}{105 d \sqrt {a \sec (c+d x)+a}}+\frac {2 (7 B+C) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{35 a d}+\frac {2 C \tan (c+d x) \sec ^2(c+d x) \sqrt {a \sec (c+d x)+a}}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.43, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {4088, 4010, 4001, 3792} \[ \frac {2 (35 A-14 B+18 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{105 d}+\frac {2 a (35 A+49 B+27 C) \tan (c+d x)}{105 d \sqrt {a \sec (c+d x)+a}}+\frac {2 (7 B+C) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{35 a d}+\frac {2 C \tan (c+d x) \sec ^2(c+d x) \sqrt {a \sec (c+d x)+a}}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3792
Rule 4001
Rule 4010
Rule 4088
Rubi steps
\begin {align*} \int \sec ^2(c+d x) \sqrt {a+a \sec (c+d x)} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {2 C \sec ^2(c+d x) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{7 d}+\frac {2 \int \sec ^2(c+d x) \sqrt {a+a \sec (c+d x)} \left (\frac {1}{2} a (7 A+4 C)+\frac {1}{2} a (7 B+C) \sec (c+d x)\right ) \, dx}{7 a}\\ &=\frac {2 C \sec ^2(c+d x) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{7 d}+\frac {2 (7 B+C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{35 a d}+\frac {4 \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \left (\frac {3}{4} a^2 (7 B+C)+\frac {1}{4} a^2 (35 A-14 B+18 C) \sec (c+d x)\right ) \, dx}{35 a^2}\\ &=\frac {2 (35 A-14 B+18 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{105 d}+\frac {2 C \sec ^2(c+d x) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{7 d}+\frac {2 (7 B+C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{35 a d}+\frac {1}{105} (35 A+49 B+27 C) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {2 a (35 A+49 B+27 C) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (35 A-14 B+18 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{105 d}+\frac {2 C \sec ^2(c+d x) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{7 d}+\frac {2 (7 B+C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{35 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.34, size = 119, normalized size = 0.81 \[ \frac {\tan \left (\frac {1}{2} (c+d x)\right ) \sec ^3(c+d x) \sqrt {a (\sec (c+d x)+1)} (3 (35 A+42 B+36 C) \cos (c+d x)+(35 A+28 B+24 C) \cos (2 (c+d x))+35 A \cos (3 (c+d x))+35 A+28 B \cos (3 (c+d x))+28 B+24 C \cos (3 (c+d x))+54 C)}{105 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 110, normalized size = 0.75 \[ \frac {2 \, {\left (2 \, {\left (35 \, A + 28 \, B + 24 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (35 \, A + 28 \, B + 24 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, B + 6 \, C\right )} \cos \left (d x + c\right ) + 15 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{105 \, {\left (d \cos \left (d x + c\right )^{4} + d \cos \left (d x + c\right )^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.39, size = 286, normalized size = 1.95 \[ -\frac {2 \, {\left (105 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 105 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 105 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (245 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 175 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 105 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (175 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 119 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 147 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - {\left (35 \, \sqrt {2} A a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 49 \, \sqrt {2} B a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 27 \, \sqrt {2} C a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{105 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{3} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 2.08, size = 138, normalized size = 0.94 \[ -\frac {2 \left (-1+\cos \left (d x +c \right )\right ) \left (70 A \left (\cos ^{3}\left (d x +c \right )\right )+56 B \left (\cos ^{3}\left (d x +c \right )\right )+48 C \left (\cos ^{3}\left (d x +c \right )\right )+35 A \left (\cos ^{2}\left (d x +c \right )\right )+28 B \left (\cos ^{2}\left (d x +c \right )\right )+24 C \left (\cos ^{2}\left (d x +c \right )\right )+21 B \cos \left (d x +c \right )+18 C \cos \left (d x +c \right )+15 C \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{105 d \cos \left (d x +c \right )^{3} \sin \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.64, size = 479, normalized size = 3.26 \[ \frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,4{}\mathrm {i}}{3\,d}-\frac {\left (56\,B+48\,C\right )\,1{}\mathrm {i}}{105\,d}\right )+\frac {\left (140\,A+280\,B\right )\,1{}\mathrm {i}}{105\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}+\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,4{}\mathrm {i}}{7\,d}-\frac {\left (8\,A+8\,B+16\,C\right )\,1{}\mathrm {i}}{7\,d}+\frac {\left (4\,A+8\,B\right )\,1{}\mathrm {i}}{7\,d}\right )+\frac {A\,4{}\mathrm {i}}{7\,d}-\frac {\left (8\,A+8\,B+16\,C\right )\,1{}\mathrm {i}}{7\,d}+\frac {\left (4\,A+8\,B\right )\,1{}\mathrm {i}}{7\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^3}+\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (-\frac {A\,4{}\mathrm {i}}{5\,d}+\frac {C\,16{}\mathrm {i}}{35\,d}+\frac {\left (28\,A+56\,B+112\,C\right )\,1{}\mathrm {i}}{35\,d}\right )-\frac {\left (28\,A+56\,B\right )\,1{}\mathrm {i}}{35\,d}+\frac {\left (28\,A+112\,C\right )\,1{}\mathrm {i}}{35\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^2}-\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (140\,A+112\,B+96\,C\right )\,1{}\mathrm {i}}{105\,d\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________